package com.longe.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 这个类中演示权限注解
 */
@Controller
@RequestMapping("customer")
public class CustomerController {

    @RequestMapping("detail")
    @RequiresPermissions({"customer:detail"})
    public String detail(){

        return "/customer/detail";
    }

    @RequestMapping("add")
    @RequiresPermissions({"customer:add"})
    public String add(){

        return "/customer/add";
    }

    @RequestMapping("update")
    public String update(){

        return "/customer/update";
    }

    @RequestMapping("delete")
    @RequiresPermissions({"customer:delete"})
    public String delete(){

        return "/customer/delete";
    }

    @RequestMapping("query")
    @RequiresPermissions({"customer:query"})
    public String query(){

        return "/customer/query";
    }
}
